home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-09-17 | 1.2 KB | 54 lines | [TEXT/ALFA] |
-
-
-
- proc procDefinition {} {
- global auto_index auto_help
-
- watchCursor
- set wins [llength [winNames]]
- if {!$wins || ![string length [set res [getSelect]]]} {
- helpDummy
- set res [listpick -p {Proc?} [set procdefs [lsort -ignore [concat [array names auto_index] [array names auto_help]]]]]
- }
- if {$wins} {select [getPos]}
- if {[string length $res]} {
- if {[catch {set fname $auto_index($res)}]} {
- helpDummy
- if {[catch {set res $auto_help($res)}]} {
- message "No such proc."
- return;
- }
- regexp {[^/]*} $res fname
- regexp {/(.*)} $res dummy pos
- }
- if {[expr {[lsearch [winNames -f] "*$fname"] >= 0}]} {
- bringToFront $fname
- } elseif {[file exists $fname]} {
- if {[info exists pos]} {
- edit -r $fname
- } else {
- edit $fname
- }
- } else {
- alertnote "File \" $fname \" not found." ; return
- }
-
- if {![info exists pos]} {
- set pos [lindex [search -f 1 -r 1 -i 0 "^proc\[ \t\]+$res " 0] 0]
- }
- display $pos
- }
- }
-
- proc dumpHelpMarks {} {
- set blah "proc helpDummy {} {}\r"
-
- foreach m [getNamedMarks] {
- append blah "set auto_help([lindex $m 0]) \"\$HOME:Help:[file tail [lindex $m 1]]/[lindex $m 3]\"\r"
- }
- new
- insertText $blah
- }
-
- #================================================================================
-